//
//  SYClassPhotoCell.m
//  ChatDemo-UI2.0
//
//  Created by syun on 17/2/28.
//  Copyright © 2017年 syun. All rights reserved.
//

#import "SYClassPhotoCell.h"

@implementation SYClassPhotoCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseIdentifier];

    if (self) {
        

        
    }
    
    return self;
}
- (void)setDataForCellWith:(photoListModel *)model
{
    if ([model.lastfileid integerValue] >0) {
        
        _noImageView.hidden = YES;
        _topIamgeView.backgroundColor = [UIColor clearColor];
        NSString * imagePath = [NSString stringWithFormat:@"%@%@",PICPERFIXURL,model.lastfileid];
        [_topIamgeView sd_setImageWithURL:[NSURL URLWithString:imagePath]];
    }else
    {
        _noImageView.hidden = NO;
        _topIamgeView.backgroundColor = [UIColor colorWithHexString:@"f5f8fa"];
    }
    

    _className.text = model.classname;
    
    _numLabel.text = [NSString stringWithFormat:@"%ld张",model.dynamiccount];
    NSLog(@"11= %@ 22=%@ 33= %ld",model.lastfileid,model.classname,(long)model.dynamiccount);
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
